package com.ktjy.util;

/**
 * EmptyUtil
 *
 * @author LILIBO
 * @since 2025/5/26
 */
public class EmptyUtil {

    /**
     * 判断值是否为默认值
     *
     * @param value
     * @return
     */
    public static boolean isNonDefaultValue(Object value) {
        if (value == null) {
            return false;
        }
        if (value instanceof CharSequence) {
            return !((CharSequence) value).isEmpty();
        }
        if (value instanceof Number) {
            return ((Number) value).doubleValue() != 0;
        }
        if (value instanceof Boolean) {
            return (Boolean) value;
        }
        return true;
    }

}
